ToUniversalTime
Type
handler
Summary
Convert local time to universal time
Syntax
ToUniversalTime(<pSeconds>,<pTimeZone>)
Description
Use the ToUniversalTime function to find the universal time, given the local time for the specified time zone.
Parameters
Name | Type | Description |
---|---|---|
pSeconds | The local time | |
pTimeZone | The time zone, in the form returned by the TimeZones function. |
Examples
local tDateTime
put "2018,2,14,13,38,0,4" into tDateTime
convert tDateTime to seconds
put ToUniversalTime(tDateTime, "Africa/Windhoek") into tDateTime
convert tDateTime to dateitems
-- tDateTime contains "2018,2,14,11,38,0,4"
Related
handler: TimeZones
Compatibility and Support
Platforms
mobile
desktop